function ModulePopupBoxSimple() {
  this._background = null;
  this._container = null;
}

ModulePopupBoxSimple.prototype._reset = function() {
  var _self = this;
  this._close();

  var size = DOMUtils.xDocSize();
  this._background = document.createElement('div');
  this._background.className = 'popupSimpleWhite';
  this._background.style.width = size.w + 'px';
  this._background.style.height = size.h + 'px';
  document.body.appendChild(this._background);
  
  if (this._pop) {
    this._background.onclick = function() { _self._close(); };
  }
  
  this._container = document.createElement('div');
  this._container.className = (this._pop) ? 'popupSimpleBase1' : 'popupSimpleBase';
  this._container.style.top = ((this._position[1] - 60) > 0) ? (this._position[1] - 60) + 'px' : '0px';
  this._container.style.left = ((this._position[0] + 200) > window.screen.width) ? (window.screen.width - 200) + 'px' : this._position[0] + 'px';
  this._background.appendChild(this._container);
  
  var posX = this._position[0];
  var posY = ((this._position[1] - 100) > 0) ? (this._position[1] - 100) : 0;
  //window.scrollTo(posX, posY);
};


ModulePopupBoxSimple.prototype._open = function(container, options) {
  var table, tr, td, _self = this;
  this._position = (options && options.pos) ? options.pos : [((document.body.offsetWidth / 2) - 50), ((document.body.offsetHeight / 2) - 50)];
  this._pop = (options && options.pop) ? options.pop : null;
  this._reset();
  
  this._gui = new PopupBoxSimple(document, this._container, options.width, options.height, null, null, options)._gui;
  this._gui.panel.appendChild(container);
};


ModulePopupBoxSimple.prototype._close = function() {
  if (this._background) {
    document.body.removeChild(this._background);
    this._background = null;
    this._container = null;
  }
};